<?php
session_start();
if($_SESSION['username']!="")
{
?>
<!DOCTYPE html>
<html lang="en">
  <head>
     <? include "./include/head.php"; ?>
		 <? include "./include/js.php"; ?>
		 
	 <script type="text/javascript" src="jquery/jquery.min.js"></script>
		<script type="text/javascript" src="jquery/jquery.validate.min.js"></script>
		
		<script type="text/javascript">
		$(document).ready(function() {
			$('#gantipassword').validate({
				rules: {
				
					konfirmasipassword: {
						equalTo: "#passwordbaru"
					}
				},
				messages: {
				
					konfirmasipassword: {
						
						equalTo: "Password tidak sama"
					}
				}
			});
		});
		
		</script>
  </head>
  <body>
  <? include "./include/body.php"; 
  include "./config/connection.php";?>
        <div class="span9">
        <div class="hero-unit">  
        <?php
	error_reporting(0);$input = $_GET["input"];
					if($input == "invalid")
					{
						echo"<b>Maaf data tidak lengkap, silahkan ulangi</b>" ;
					}				 
	?>
	 <form class="form-horizontal" action="gantipassword_process_edit.php" method="post" id="gantipassword">
            <fieldset>
                 <label class="control-label">Password Lama*</label>
                    <div class="controls">
                        <input type="password" name="passwordlama" id="passwordlama" class="required"/>
                        <p class="help-block"></p>
                    </div>
					<label class="control-label">Password Baru*</label>
                    <div class="controls">
                        <input type="password" name="passwordbaru" id="passwordbaru" class="required"/>
                        <p class="help-block"></p>
                    </div>
					<label class="control-label">Ulangi Password*</label>
                    <div class="controls">
                        <input type="password" name="konfirmasipassword" id="konfirmasipassword" class="required"/>
                        <p class="help-block"></p>
							* Harus Diisi
                    </div>
				
					<p></p>
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <button class="btn btn-danger" type="submit">
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ubah&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                </button>
                &nbsp;&nbsp;&nbsp;
                <button class="btn btn-danger" type="reset" value="Reset">
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Batal&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                </button>
                </div>
               </fieldset>
        </form>
            
            
          </div>
          </div><!--/row-->

         
            </div><!--/span-->
          </div><!--/row-->
        </div><!--/span-->
      </div><!--/row-->

      <hr>

 <? include "./include/menubawah.php"; ?>
    <?php
    
    ?>
  </body>
</html>
<?php
    }
else {
    include 'warning.php';
}
?>